﻿using MiniFox.Components;
using MiniFox.Infrastructure;
using MiniFox.Platform.Applications.Models;
using MiniFox.Platform.Applications.Services;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.Applications
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(OrganizationService))]
    public interface IOrganizationService
    {
        /// <summary>
        /// 获取当前人所在组织机构(超管所有组织机构可见)
        /// </summary>
        /// <returns></returns>
        IEnumerable<Organization> GetOrganizations();
        /// <summary>
        /// 获取当前人所在部门(超管所有部门可见)
        /// </summary>
        /// <returns></returns>
        IEnumerable<Dept> GetUserDepts();
        /// <summary>
        /// 获取当前人所在部门(超管所有部门可见)
        /// </summary>
        /// <param name="orgId"></param>
        /// <returns></returns>
        IEnumerable<Dept> GetUserDepts(string orgId);
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerable<Dept> GetManagedDepts();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="orgId"></param>
        /// <returns></returns>
        IEnumerable<Dept> GetManagedDepts(string orgId);
        /// <summary>
        /// 
        /// </summary>
        TreeResultObject<Dept> DeptTreeObject { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="orgId"></param>
        /// <param name="deptId"></param>
        /// <returns></returns>
        ITreeNode GetDepts(string orgId, string deptId);
    }
}
